<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/media/images/favicon.ico" />
		
		<title>Hoang Long admin</title>
		<style type="text/css" title="currentStyle">
			@import "css/demo_page.css";
			@import "css/demo_table_jui.css";
			@import "css/jquery-ui-1.8.4.custom.css";
		</style>
		<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
		<script type="text/javascript" language="javascript" src="js/jquery.dataTables.js"></script>
		<script type="text/javascript" charset="utf-8">
			$(document).ready(function() {
				oTable = $('#example').dataTable({
					"bJQueryUI": true,
					"sPaginationType": "full_numbers"
				});
			} );
		</script>
	</head>
<body id="dt_example" background="../images/background.png" style="background-repeat:repeat; font-size:24px;" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF">
<div id="container">
<div class="demo_jui">
<?php 
	echo '<table width="700px" cellpadding="0" cellspacing="0" border="0" class="display" id="example">
	<thead>
		<tr>
			<th>Room name </th>
			<th>Room no </th>
			<th>Start time</th>
			<th>Finish time</th>
			<th>Customer name</th>
			<th>Phone number</th>
			<th>Email</th>
			<th>Status</th>
		</tr>
	</thead><tbody>';
	
	require_once('database.php');
	$link=connectDB();
	$tbl_name='bookingroom'; // Table name
	$tbl_name1='room'; // Table name
	$tbl_name2='services'; // Table name
	
	
	//echo "ket noi csdl thanh cong";
	
	$sql="SELECT * FROM $tbl_name, $tbl_name1, $tbl_name2 where $tbl_name.serviceId = $tbl_name2.id AND $tbl_name.unitId = $tbl_name1.id";
	$result=mysql_query($sql, $link);
	
	while ($row = mysql_fetch_assoc($result)) {
		echo '<tr class="gradeC">';
		echo '<td>'.$row['vn'].'-'.$row['roomName'].'</td>';
		echo '<td>'.$row['roomNo'].'</td>';
		echo '<td>'.$row['startTime'].'</td>';
		echo '<td>'.$row['finishTime'].'</td>';
		echo '<td>'.$row['customerName'].'</td>';
		echo '<td>'.$row['phoneNumber'].'</td>';
		echo '<td>'.$row['email'].'</td>';
		echo '<td>'.$row['status'].'</td>';
		echo '</tr>';
	}
	mysql_free_result($result);
	
	echo '</tbody></table>';
?>
</div>
</div>
</body></html>